﻿using Bmz.IM.Communication;
using Bmz.IM.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Bmz.IM.Server
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            IPEndPoint ipEndPoint = new IPEndPoint(IPAddress.Parse(ConfigurationManager.AppSettings["ServerIp"]), int.Parse(ConfigurationManager.AppSettings["ServerPort"]));
            IMServer server = new IMServer();
            server.Initialize(ipEndPoint);
            #region service
            //ServiceBase[] ServicesToRun;
            //ServicesToRun = new ServiceBase[] 
            //{ 
            //    new Service1() 
            //};
            //ServiceBase.Run(ServicesToRun);
            #endregion
        }
    }
}
